@extends('admin.common.main')


@section('content')

    <article class="page-container">

        @include('admin.common.error'){{--如果出现错误--}}

        <form action="{{route('admin.node.update',$nodeInfo)}}" method="post" class="form form-horizontal" id="form-member-add">
            {{--  .prevent 修饰符 提交提交表单后停止加载页面  --}}
            @method('put')
            @csrf
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>节点名：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" class="input-text" value="{{$nodeInfo['name']}}" placeholder="" id="name" name="name">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>路由别名：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" class="input-text" value=" {{$nodeInfo['route_name']}}"  name="route_name">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>pid：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <select name="" id="" class="select">

                        <option value="0">==顶级==</option>
                        @foreach($data as $val)
                            <option value="{{$val['id']}}"  {{$val['id']==$nodeInfo['pid'] ? "selected" :"" }}  >{{$val['name']}}</option>
                        @endforeach

                    </select>
                </div>
            </div>
            <div class="">
                <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否为菜单：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="radio" class="radio-inline" value="1"  name="is_menu"   {{$nodeInfo['is_menu'] == 1 ? "checked" :"" }}> 是
                    <input type="radio" class="radio-inline" value="0"  name="is_menu"   {{$nodeInfo['is_menu'] == 0 ? "checked" :"" }}> 否
                </div>
            </div>

            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
            </div>
        </form>
    </article>

@endsection



@section('js')

    <script type="text/javascript">




</script>


@endsection
